package com.gfxy.modules.statistics.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gfxy.modules.items.vo.QtxmhxzbMemberPage;
import com.gfxy.modules.statistics.mapper.CoreSummaryMapper;
import com.gfxy.modules.statistics.service.ICoreSummaryService;
import com.gfxy.modules.statistics.vo.CoreSummaryForOrgVo;
import com.gfxy.modules.statistics.vo.CoreSummaryForSchoolVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CoreSummaryServiceImpl implements ICoreSummaryService {


    @Autowired
    private CoreSummaryMapper coreSummaryMapper;

    @Override
    public List<CoreSummaryForSchoolVo> listSummaryForSchool(String date) {
        return coreSummaryMapper.listSummaryForSchool(date);
    }

    @Override
    public Page<CoreSummaryForOrgVo> listSummaryForOrg(String date,String orgCode, Integer pageNo, Integer pageSize) {
        Page<CoreSummaryForOrgVo> page = new Page<>(pageNo, pageSize);

        Page<CoreSummaryForOrgVo> page1 = page.setRecords(coreSummaryMapper.listSummaryForOrg(date, orgCode));

        return page1;
    }

    @Override
    public List<CoreSummaryForOrgVo> listSummaryForOrg(String date, String orgCode) {
        return coreSummaryMapper.listSummaryForOrg(date, orgCode);
    }

    @Override
    public List<CoreSummaryForOrgVo> listSummary(String date) {
        return coreSummaryMapper.listSummary(date);
    }
}
